package com.gxa.jjty.core.service;

import com.github.pagehelper.PageInfo;

import java.io.Serializable;
import java.util.List;

/**
 * @author JJuventus
 * @date 2021/11/10 11:24
 */
public interface BaseService<T> {

    T selectById(Serializable id);

    PageInfo<T> selectByPage(Integer page,Integer size,T... t) throws IllegalAccessException;

    /**
     * 查询条件是 & 的关系
     * @param page
     * @param size
     * @param t
     * @return
     * @throws IllegalAccessException
     */
    PageInfo<T> selectByPageAnd(Integer page,Integer size,T... t) throws IllegalAccessException;

    PageInfo<T> selectByPageDesc(Integer page,Integer size,T... t) throws IllegalAccessException;

    List<T> selectDesc(T t) throws IllegalAccessException;

    List<T> selectDescLike(T t)throws IllegalAccessException;

    List<T> select(T t);

    List<T> selectAll();

    Integer updateById(T t) throws IllegalAccessException;

    Integer deleteById(Serializable id);

    T insert(T t);

    List<T> selectDesc1(T t)throws IllegalAccessException;
}
